package uk.ac.ebi.bioinvindex.dao.ejb3;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.dbunit.dataset.datatype.DataType;
import org.dbunit.dataset.datatype.DataTypeException;
import org.dbunit.dataset.datatype.DefaultDataTypeFactory;

import java.sql.Types;

/**
 * User: Nataliya Sklyar (nsklyar@ebi.ac.uk)
 * Date: Sep 21, 2007
 */
public class H2DataTypeFactory  extends DefaultDataTypeFactory
{
   private static final Log log = LogFactory.getLog(H2DataTypeFactory.class);

   public DataType createDataType(int sqlType, String sqlTypeName)
     throws DataTypeException
   {
      if (sqlType == Types.BOOLEAN)
      {
         return DataType.BOOLEAN;
       }

      return super.createDataType(sqlType, sqlTypeName);
    }
}
